import { AxiosResponse } from 'axios'
import http from '../http'
import {DashboardStatisData,DashboardSaleData,DashboardSaleDataQuery} from './types'

/**
 * 首页模块api
 */
class DashboardApi {
	/**
	 * @description 获取首页统计数据
	 * @returns {Promise<Axios.Response>}
	 */
	static getStatisData():Promise<Axios.Response<DashboardStatisData>>{
		return http.get('/index/index-head-list')
	}
	/**
	 * @description 获取首页销售数据
	 * @param params
	 * @returns
	 */
	static getIndexSaleList(params:DashboardSaleDataQuery):Promise<Axios.List<DashboardSaleData[]>>{
		return http.get('/index/index-sales-list',{params})
	}
}

export default DashboardApi
